package org.example.what_mall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema(description = "用户")
@TableName("users")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User {
    @Schema(description = "用户id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "邮箱")
    @TableField(value = "email")
    private String email;

    @Schema(description = "用户名")
    @TableField(value = "nickname")
    private String nickname;

    @Schema(description = "密码")
    @TableField(value = "pwd")
    private String pwd;

    @Schema(description = "头像")
    @TableField(value = "headimg")
    private String headimg;

    @Schema(description = "性别")
    @TableField(value = "sex")
    private String sex;

    @Schema(description = "接收人")
    @TableField(value = "recipient")
    private String recipient;

    @Schema(description = "地址")
    @TableField(value = "address")
    private String address;

    @Schema(description = "手机号")
    @TableField(value = "phone")
    private String phone;

    @Schema(description = "角色")
    @TableField(value = "role")
    private Integer role;
}
